<div id="join-question-dialog" title="回答/评论/转发" style="display:none;">
	<script type="text/javascript">
	//<![CDATA[
	var submit_join_form = false;
	function submit_weibo(){
		if(submit_join_form)
		{
			return false;//只允许提交一次。
		}
		
		submit_join_form = true;
		$('#weibo-publish-errorinfo').html('');
		
		if($('#weiboName').val()=='')
		{
			$('#weibo-publish-errorinfo').html('');
			var errorinfo ="<span class='ui-state-error ui-corner-all'><span class='ui-icon ui-icon-alert'></span> 提示：答案不能为空！</span>";
			$('#weibo-publish-errorinfo').height(24);
			$('#weibo-publish-errorinfo').html(errorinfo);
			submit_join_form = false;
			return false;
		}
		$.ajax({
			async:true, 
			type:'post', 
			complete:function(request, json) {}, 
	
			success:function(request, xhr) {
					submit_join_form = false;
					if(request.success)
					{
						$('#weiboName').val('');//$('#weiboName').html('');
						$('#join-question-dialog').dialog('close');		
						AjaxHelper.invite_join(request.question_id,"已成功回答，您可以点名邀请好友来回答这个问题");
					}
					else
					{
						$('#weibo-publish-errorinfo').html('');
						var errorinfo = '';
						for(var i in request)
						{
							errorinfo +="<span class='ui-state-error ui-corner-all'><span class='ui-icon ui-icon-alert'></span> 错误： "+request[i]+"</span>";
						}
						$('#weibo-publish-errorinfo').height(24);
						$('#weibo-publish-errorinfo').html(errorinfo);
					}
			}, 
			data:$('#join-question-form').serialize(), 
			url:'/weibos/publish',
			dataType:'json'
		});
		return false; 
	}	
	//]]>
	</script>
	<form accept-charset="utf-8" action="/weibos/publish" method="post" onsubmit="return false;" id="join-question-form">
	<div class="ui-corner-bottom ui-helper-clearfix" style="margin:0 auto;">
		<fieldset>
		<input type="hidden" id="weiboId" name="data[Weibo][id]">
		<input type="hidden" id="weiboModel" name="data[Weibo][model]" value="Question">
		<input type="hidden" id="weiboQId" name="data[Weibo][parent_id]">
		<input type="hidden" id="weiboQId" name="data[Weibo][data_id]">
		<div class="publish-header ui-helper-clearfix">
			<div class="head_pic regionleft userhead">
				
				<img title="arlon" uid="1753042757" src="http://tp2.sinaimg.cn/1835369353/50/1288067539/1">
				
			</div>
			<div id="join-question-name">
				
			</div>
		</div>
		<div class="publish-header ui-helper-clearfix" style="line-height:24px;">
			<label for="weiboName">输入您的答案:</label>
		</div>
		<div class="inputextarea ui-corner-all" style="border:1px solid #ccc;padding:2px;margin:5px 10px;">
			<textarea style="font-family: Tahoma,宋体; border-style: solid; 
			border-width: 0px; word-wrap: break-word;
			 font-size: 14px; line-height: 18px; overflow-x: hidden;overflow-y:auto;
		padding:0;width:596px;height:70px;line-height:124%;" id="weiboName"
				name="data[Weibo][name]"></textarea>
		</div>
		<div class="toolbar ui-helper-clearfix">			
			<div style="float:right;" class="submit">
				<a id="publisher_submit" onclick="submit_weibo();" href="javascript:void(0);"></a>
			</div>			
		</div>
		<div id="weibo-publish-errorinfo" class="line-height:24px;padding:4px;">
			
		</div>		
		</fieldset>
	</div>
	</form>
</div>